package com.sumainfor.pc.gmio.controller.assistant;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.gmio.service.BillReviewService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Jack Chen
 * @Create 2019-01-23 17:59
 * 业主账单审核
 */
@RestController
@RequestMapping("/billReview")
public class BillReviewController {

    @Autowired
    private BillReviewService reviewService;


    /**
     * 查询列表数据
     *
     * @param state
     * @param page
     * @return
     */
    @RequestMapping("/getTableList")
    public JsonResult getTableList(Integer state, Page page, String projectId) {
        return reviewService.getTableList(state, page, projectId);
    }

    /**
     * 审核通过
     *
     * @param outId
     * @return
     */
    @RequestMapping("/uploadPayProof")
    public JsonResult uploadPayProof(String outId) {
        if (StringUtils.isBlank(outId)) {
            return JsonResult.errorForEmpty();
        }
        return reviewService.uploadPayProof(outId);
    }

}
